import axios from '@/libs/api.request'
import config from '@/config'
/*
信息提交
 */
export const insert = (data) => {
  return axios.request({
    url: 'http://dlqt.tripln.com/api/us/ctc/ctcbindsubmit/insert',
    data: data,
    type: 'post'
  })
}

/*
图片验证码
 */
export const getCodePic = (data) => {
  return axios.request({
    url: 'http://dlqt.tripln.com/api/uc/smc/smsService/getCodePic',
    data: data,
    type: 'post'
  })
}

/*
图片验证码
 */
export const createVerificationCode = (data) => {
  return axios.request({
    url: '/api/uc/smc/smsService/createVerificationCode',
    data: data,
    type: 'post'
  })
}
export const createCheckBindSubmitCheckCode = (data) => {
  return axios.request({
    url: '/api/uc/ctc/ctcBindSubmitService/createCheckBindSubmitCheckCode',
    data: data,
    type: 'post'
  })
}
// 短信验证
export const checkVerificationCode = (data) => {
  return axios.request({
    url: '/Api/Api/bindMzMobile',
    data: data,
    type: 'post',
    php: true
  })
}
/**
 * 发送短信
 * @param data
 * @returns {*|Promise<any>|Window.Promise}
 */
export const sendMsg = (data) => {
  return axios.request({
    url: '/Api/Api/sendMsg',
    data: data,
    type: 'post',
    php: true
  })
}
/**
 * 短信验证，并且绑定手机号
 * @param data
 * @returns {*|Promise<any>|Window.Promise}
 */
export const skForeCheckCode = (data) => {
  return axios.request({
    url: '/Api/Api/skForeCheckCode',
    data: data,
    type: 'post',
    php: true
  })
}
/**
 * 原来老居游用户获取身份证保存当前系统
 * @returns {*|Promise<any>|Window.Promise}
 */
export const getJuyouIdCard = () => {
  return axios.request({
    url: '/Api/Api/getJuyouIdCard',
    type: 'post',
    php: true
  })
}
/**
 * 居游老用户升级成市民卡用户
 * @param data
 * @returns {*|Promise<any>|Window.Promise}
 */
export const skForeCheckCode2 = (data) => {
  return axios.request({
    url: '/Api/Api/skForeCheckCode2',
    data: data,
    type: 'post',
    php: true
  })
}

// 获取用户信息
export const getMyInfo2 = () => {
  return axios.request({
    url: '/Api/Api/skForeMyInfo2',
    type: 'get',
    php: true
  })
}
// 商客
export const findUserAccount = () => {
  return axios.request({
    url: 'api/uc/mc/merchantUserAccountService/findUserAccount?data=today',
    type: 'get',
    php: true
  })
}
// 身份证识别
export const newCheckSfz = (data) => {
  return axios.request({
    url: '/Api/Api/yunMaiOrc/cid/' + config.company_code,
    type: 'get',
    php: true,
    data: data
  })
}
/**
 * 身份实名认证
 * @param data
 * @returns {*|Promise<any>|Window.Promise}
 */
export const skv4authCardid = () => {
  return axios.request({
    url: '/Api/Api/skv4authCardid',
    type: 'get',
    php: true
  })
}
/**
 * 领取市民卡
 * @returns {*|Promise<any>|Window.Promise}
 */
export const createJuYouCard = () => {
  return axios.request({
    url: '/api/uc/ctc/CtcCardHandleInfoService/createJuYouCard',
    type: 'get'
  })
}
